%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Adam M. Goldstein, PhD 
% Opening comment
% Opening comment
% Opening comment
% Time-stamp: <2009-10-10 01:35:45 drifter>
% Time stamp indicates time of last save.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PREAMBLE
%
% INITIAL PACKAGES AND DECLARATIONS
%
% The Essential Packages and Declarations
%
\documentclass[twoside,openany]{memoir} % defaults: letterpaper,
                                % 10pt,twoside,onecolumn,openright,final
                                % stock and text block default to 
                                % memoir-class default.

\raggedbottom			% Page bottoms are not forced to line up
				% but vertical spacing is consistent

\usepackage{hyperref}		% For formatting URL's and email addresses
				% and inserting hyper-links

\usepackage{microtype}		% Micro-typographical extensions	

\usepackage{texnames}           % Allows use of "bumpy road" logos

\usepackage{lmodern}            % Use latin modern fonts
\usepackage[T1]{fontenc}        % Use Type 1 encoding
				
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% Optional packages that might be useful
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{lettrine}

%\usepackage{booktabs}		% Create professional quality tables

%\usepackage{rotating}		% For rotating tables and other items

%\usepackage{apacite}		% Uncomment this and ``apacite.bst''
				% style below for apa citations

%\usepackage{graphicx}		% For inserting graphics

%\usepackage{url}		% For formatting URL's and email
				% addresses; doesn't create
                                % hyper-links
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Theorem-like environments
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\newtheorem{case}{Case}
%\newtheorem{definition}{Definition}
%\newtheorem{schema}{Schema}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
% BEGIN DOCUMENT
%
\begin{document}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Some definitions.
%
\makepagestyle{republicchapterspagestyle}
\makeevenhead{republicchapterspagestyle}{}{\textsl{CHAPTER \thechapter}}{}
\makeoddhead{republicchapterspagestyle}{}{\textsl{\rightmark}}{}
\makeevenfoot{republicchapterspagestyle}{}{\textsl{\thepage}}{}
\makeoddfoot{republicchapterspagestyle}{}{\textsl{\thepage}}{}

\makepagestyle{republicintroductionpagestyle}
\makeevenhead{republicintroductionpagestyle}{}{\textsl{\rightmark}}{}
\makeoddhead{republicintroductionpagestyle}{}{\textsl{\rightmark}}{}
\makeevenfoot{republicintroductionpagestyle}{}{\textsl{\thepage}}{}
\makeoddfoot{republicintroductionpagestyle}{}{\textsl{\thepage}}{}

\makepagestyle{republicfrontmatterpagestyle}
\makeevenhead{republicfrontmatterpagestyle}{}{\textsl{\leftmark}}{}
\makeoddhead{republicfrontmatterpagestyle}{}{\textsl{\leftmark}}{}
\makeevenfoot{republicfrontmatterpagestyle}{}{\textsl{\thepage}}{}
\makeoddfoot{republicfrontmatterpagestyle}{}{\textsl{\thepage}}{}

\makepagestyle{republicappendixpagestyle}
\makeevenhead{republicappendixpagestyle}{}{\textsl{APPENDIX \thechapter}}{}
\makeoddhead{republicappendixpagestyle}{}{\textsl{\rightmark}}{}
\makeevenfoot{republicappendixpagestyle}{}{\textsl{\thepage}}{}
\makeoddfoot{republicappendixpagestyle}{}{\textsl{\thepage}}{}

\strictpagechecktrue  

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\frontmatter

\pagestyle{empty}

\include{Republic-cover}
\include{Half-title}
\include{Republic-title}
\include{copyright-page}

\pagestyle{republicfrontmatterpagestyle}

\tableofcontents

\mainmatter

\pagestyle{republicintroductionpagestyle}

\include{RepublicIntroduction}

\pagestyle{republicchapterspagestyle}

\include{RepublicBook01}
\include{RepublicBook02}
\include{RepublicBook03}
\include{RepublicBook04}
\include{RepublicBook05}
\include{RepublicBook06}
\include{RepublicBook07}
\include{RepublicBook08}
\include{RepublicBook09}
\include{RepublicBook10}

\appendix

\appendixpage

\pagestyle{republicappendixpagestyle}

\include{MadannaEssays}

\backmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% BIBLIOGRAPHY STYLE
%
%\bibliographystyle{amnh-print}	        % Comment this if apa is used
%\bibliographystyle{apacite} 		% Uncomment this if apa citations
				        % Also, for apa style:
				        % uncomment apacite package
                                        % declaration in preamble 
%
% BIBTEX BIBLIOGRAPHY FILE
%
%\bibliography{drifterbib.bib}		% Default is drifterbib.bib
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright notice---will appear at the bottom of the final
%  page of the document
%
% \vfill
% \begin{flushleft}
%   \hrulefill \\
%   {\scriptsize \emph{This essay \copyright\ MONTH YEAR Adam
%       M. Goldstein. Version NUMBER.}}
% \end{flushleft}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% END DOCUMENT
%
\end{document}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
%
---------------------------------------------------------------------------
***************************************************************************
APPENDIX OF USEFUL SNIPPETS OF CODE---CUT, PASTE, AND MODIFY
---------------------------------------------------------------------------
***************************************************************************
---------------------------------------------------------------------------
I. TABLE THAT PRINTS IN LANDSCAPE ORIENTATION, USING THE BOOKTABS PACKAGE
---------------------------------------------------------------------------

\begin{sidewaystable}
\begin{centering}
\begin{tabular}{@{}rllll@{}} \toprule 
\multicolumn{5}{c}{\hspace{1.1in} Heading} \\ \cmidrule(l){2-5}

   & C2 & C3 & C4 & C5 \\ \midrule
C1 & C2 & C3 & C4 & C5 \\
C1 & C2 & C3 & C4 & C5 \\ 
C1 & C2 & C3 & C4 & C5 \\

\end{tabular}
\caption{Put the caption here.}
\end{centering}
\label{table:tablename}

---------------------------------------------------------------------------
II. A SMALLER TABLE, FLOATED AND CENTERED HORIZONTALLY ON THE PAGE
---------------------------------------------------------------------------

\begin{table}[htdp]
\caption{Example of fitness relationships in fluctuating environments}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
& Wet Environment & Dry Environment \\
\hline
Fitness of the $A_{1}$ allele & $w$ & $.95w$ \\
\hline
Fitness of the $A_{2}$ allele & $.95w$ & $w$ \\
\hline
\end{tabular}
\end{center}
\label{table:fitnessrelationships}
\end{table}

---------------------------------------------------------------------------
III.	AN IMAGE, FLOATED AND CENTERED ON THE HORIZONTALLY ON THE PAGE
---------------------------------------------------------------------------

\begin{figure}[htbp]
\begin{center}
\includegraphics[angle=-0.70, scale=0.54]{drift1.png}
\caption[Allele frequencies evolving by drift]{Allele frequencies of
  identical populations evolving under drift alone. Frequency of the
  $A_{1}$ allele is represented on the $Y$-axis. See text for
  discussion. Acknowledgment: Gillespie, John H. \emph{Population
    Genetics: A Concise Guide}. p.\ 21, Fig 2.1. \copyright\ 1998 The
  Johns Hopkins University Press. Reprinted with permission of The
  Johns Hopkins University Press.}
\label{figure:drift1} 
\end{center}
\end{figure}

---------------------------------------------------------------------------
NO MORE CODE!
---------------------------------------------------------------------------









---------------------------------------------------------------------------
Stop scrolling down! ;-}
---------------------------------------------------------------------------
